package cn.com.jonpad.demo07_data_mybatis01.config;

import org.apache.ibatis.session.Configuration;
import org.mybatis.spring.boot.autoconfigure.ConfigurationCustomizer;
import org.springframework.context.annotation.Bean;

@org.springframework.context.annotation.Configuration
public class MybatisConfig {
	@Bean
	public ConfigurationCustomizer configurationCustomizer(){
		return new ConfigurationCustomizer(){

			@Override
			public void customize(Configuration configuration) {
				// 设置驼峰命名
				configuration.setMapUnderscoreToCamelCase(true);
			}
		};
	}
}
